<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
		var	rows=prompt('请输入行号：');
           for (var y=1;y<=rows;y++){
//         	输出多少个空格
           	for (var k=1;k<=rows-y;k++){
           		document.write('&nbsp;');
           	}
//         	输出多少个星星
              for (var i=0;i<2*y-1;i++){
            	document.write('*');  
            }
              
            document.write('<br />');
           }
//       
		</script>
	</head>
	<body>
	</body>
</html>
